<%-- 
    Document   : viewDvds
    Created on : Mar 28, 2012, 9:14:54 PM
    Author     : Hiroroi
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@page import="UserPackage.*" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <table border="1" cellspacing="0" cellpadding="5">
        <% Product viewDvds[] = new ProductManager().viewDvds(); %>
        <tr>
            <th>Book Title</th>
            <th>Author</th>
            <th>Year</th>
            <th>Synopsis</th>
            <th>Price</th>
            <th> </th>
        </tr>
        <% for(int i = 0; i< viewDvds.length; i++){%>
        <tr>
            <td><%=viewDvds[i].getDvdTitle() %></td>
            <td><%=viewDvds[i].getDvdDirector() %></td>
            <td><%=viewDvds[i].getDvdYear() %></td>
            <td><%=viewDvds[i].getSynopsis() %></td>
            <td><%=viewDvds[i].getPrice() %></td>
            <td>
                <form class="AddToCart" name="AddToCart" method="POST" action="addToCart.jsp">
                    <input type="submit" value="Add To Cart"/>
                </form>
            </td>
        </tr>
        <% }%>
        </table>
    </body>
</html>
